Skip to content

Add throughput bucket support for Change Feed Processor feed polling#49583

Open
arnabnandy7 wants to merge 1 commit into
Azure:mainfrom
arnabnandy7:feature/cfp-throughput-bucket-support_49487
Open

Add throughput bucket support for Change Feed Processor feed polling#49583
arnabnandy7 wants to merge 1 commit into
Azure:mainfrom
arnabnandy7:feature/cfp-throughput-bucket-support_49487

Conversation

@arnabnandy7

Copy link
Copy Markdown

Description

Adds throughput bucket support for Change Feed Processor feed polling throughput control in Azure Cosmos DB.

When a CFP feed poll throughput control config includes throughputBucket, CFP now enables server-side throughput control for the configured group instead of only using local/client-side throughput control. This is implemented for both PK-range and EPK-range CFP paths.

Also adds unit coverage for both CFP paths and updates the Cosmos changelog.

Fixes #49487

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings June 21, 2026 20:04
@arnabnandy7 arnabnandy7 requested review from a team and kirankumarkolli as code owners June 21, 2026 20:04
@github-actions github-actions Bot added Community Contribution Community members are working on the issue Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Jun 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution @arnabnandy7! We will review the pull request and get back to you soon.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Change Feed Processor (CFP) support for throughput buckets by enabling server-side throughput control groups when ThroughputControlGroupConfig.throughputBucket is configured, covering both PK-range and EPK-range CFP implementations.

Changes:

  • Enable enableServerThroughputControlGroup(...) for CFP feed polling when throughputBucket is set (PK-range + EPK-range paths).
  • Add unit tests validating server throughput control group enablement for both CFP paths when throughputBucket is configured.
  • Document the feature addition in the Cosmos SDK changelog.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/changefeed/pkversion/FeedRangeThroughputControlConfigManager.java Switches CFP PK-range path to enable server throughput control when throughputBucket is present.
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/changefeed/epkversion/FeedRangeThroughputControlConfigManager.java Adds one-time enablement of server throughput control for throughput-bucket configs in CFP EPK-range path.
sdk/cosmos/azure-cosmos/CHANGELOG.md Notes the new CFP throughput bucket support.
sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/changefeed/pkversion/FeedRangeThroughputControlConfigManagerTests.java Adds unit coverage for throughput-bucket behavior (PK-range path).
sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/changefeed/epkversion/FeedRangeThroughputControlConfigManagerTests.java Adds unit coverage for throughput-bucket behavior (EPK-range path).

Comment on lines 39 to 43
// throughput control internally will divide the target RU across all pk ranges
// so all pk ranges can use the same local throughput control group
// Note: if global throughput control be added in future, then we will need to create one group per pkRange

if (this.throughputControlGroupEnabled.compareAndSet(false, true)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Contribution Community members are working on the issue Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE REQ]Add throughput bucket support in CFP

2 participants